/**
 * General
 */
html {
  font-family: _font(primary);
  font-size: 112.5%;
  height: 100%;
  min-height: 100%;

  @media only screen and (max-width: 600px) {
    font-size: 100%;
  }
}

body {
  background: #fff;
  color: _palette(charcoal);
  line-height: 1.66667;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  &.palette-dark {
    background: _palette(charcoal);
    color: _palette(charcoal-light-60);
  }
}

a {
  border-bottom: 1px solid currentColor;
  color: _palette(accent);
  text-decoration: none;
  -webkit-transition: .3s ease;
  transition: .3s ease;

  .accent-green & {
    color: _palette(accent-green);
  }

  .accent-blue & {
    color: _palette(accent-blue);
  }

  .accent-violet & {
    color: _palette(accent-violet);
  }

  .accent-yellow & {
    color: _palette(accent-yellow);
  }

  &:hover,
  &:focus {
    color: _palette(charcoal);
  }

  &:not(.button) {
    &:hover,
    &:focus {
      .palette-dark & {
        color: _palette(charcoal-light-60);
      }
    }
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
  line-height: 1.1;
  margin: 2.5rem 0 0.83333rem;
  text-rendering: optimizeLegibility;

  &:first-child {
    margin-top: 0;
  }

  .palette-dark & {
    color: #fff;
  }
}

h1 {
  font-size: 2.44444em;

  @media only screen and (max-width: 600px) {
    font-size: 2.22222em;
  }
}

h2 {
  font-size: 2em;

  @media only screen and (max-width: 600px) {
    font-size: 1.88889em;
  }
}

h3 {
  font-size: 1.66667em;
}

h4 {
  font-size: 1.33333em;
}

h5 {
  font-size: 1.11111em;
}

h6 {
  font-size: 1em;
}

p {
  margin: 0 0 1.66667em;
}

address {
  font-style: italic;
  margin: 0 0 1.66667em;
}

mark,
ins {
  background: #fff493;
  color: _palette(charcoal);
  padding: 0 3px;
  text-decoration: none;
}

code,
pre {
  font-family: _font(monospace);
}

pre {
  background: _palette(charcoal-light-80);
  font-size: 0.88889em;
  margin: 0 0 1.875em;
  overflow: auto;
  padding: 1.5em;
  position: relative;
  white-space: pre;

  .palette-dark & {
    background: _palette(charcoal-light-3);
  }
}

blockquote {
  font-size: 1.66667em;
  line-height: 1.3;
  margin: 1.5em 0;
  padding-left: 1.5em;
  padding-top: 0.5em;
  position: relative;

  .palette-dark & {
    color: #fff;
  }

  @media only screen and (max-width: 600px) {
    font-size: 1.33333em;
  }

  &:first-child {
    margin-top: 0;
  }

  &:before {
    color: _palette(accent);
    content: "\201C";
    font-size: 2.5em;
    left: 0;
    line-height: 1;
    position: absolute;
    top: 0;

    .accent-green & {
      color: _palette(accent-green);
    }
  
    .accent-blue & {
      color: _palette(accent-blue);
    }
  
    .accent-violet & {
      color: _palette(accent-violet);
    }
  
    .accent-yellow & {
      color: _palette(accent-yellow);
    }
  }

  p {
    margin-bottom: 0.5em;

    &:last-child {
      margin-bottom: 0;
    }
  }

  small,
  cite {
    display: block;
    font-size: 0.75em;
    font-style: normal;
    font-weight: normal;
    line-height: 1.5;
    margin-top: 1em;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

dl {
  margin: 0;
}

dt {
  font-weight: bold;
}

dd {
  margin: 0 0 1.66667em;
}

ul,
ol {
  margin: 0 0 1.66667em;
  padding: 0 0 0 1.33333em;
}

li > ul,
li > ol {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-bottom: 1px solid _palette(charcoal-light-75);
  margin: 2.5em 0;

  .palette-dark & {
    border-bottom-color: _palette(charcoal-light-7);
  }
}

table {
  line-height: 1.5;
  margin: 0 0 1.66667em;
  text-align: left;
  width: 100%;
}

caption {
  color: _palette(charcoal-light-40);
  font-size: 0.88889em;
  font-style: normal;
  margin-bottom: 0.9375em;
  text-align: left;

  .palette-dark & {
    color: _palette(charcoal-light-25);
  }
}

th,
td {
  border-bottom: 1px solid _palette(charcoal-light-75);
  padding: 0.5em 5px;

  .palette-dark & {
    border-bottom-color: _palette(charcoal-light-7);
  }
}

th {
  font-weight: bold;

  .palette-dark & {
    color: #fff;
  }
}

// Videos, audios and embeds
embed,
iframe,
object,
video {
  max-width: 100%;
}

.js-reframe {
  margin: 0 0 1.66667em;
}

// Images
img {
  height: auto;
  max-width: 100%;
}